perm filename CANON.RAS[UP,DOC]3 blob sn#560454 filedate 1981-02-02 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00008 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	---- Canon LBP-10 Printer system overview 	by RAS	 ----
C00006 00003	---- The Canon and TEX files,  PTex and Cantor and fonts ----
C00011 00004	---- Cantor: switches                                    ----
C00015 00005	---- Cantor: output and errors                           ----
C00021 00006	---- CStart: initializing the Z8000:   			 ----
C00024 00007	---- the Canon printer 					 ----
C00029 00008	---- CPrint: printing your output      			 ----
C00035 ENDMK
C⊗;
---- Canon LBP-10 Printer system overview 	by RAS	 ----

      Address questions, suggestions and bug sightings to RAS.  
   (incl questions on Cantor, CStart, CPrint and VNT fonts, font
  conversion, using the Canon, supplies and quality of the output.)

----------------------------------------------------------------------

OVERVIEW:
The Canon printer system includes:
    hardware:
	the Canon printer 
	a specially designed Z8000 micro-processor (and a power supply)

    The Z8000 drives the Canon.  We (at Sail) talk to the Z8000 via a 9600
    baud line using the programs CStart, CPrint, and Dial (for debugging)

    software:
	PTex, to create DVI files;
	Cantor, to translate DVI into CAN files;
	CStart, to load the Z8000 with the program that drives the Canon;
	CPrint, to send a CAN or text file to the Canon for printing.

Roughly, the procedure for using the Canon is:
    Prepare your text file or
    Prepare your CAN file, run PTex on a TEX file, then run Cantor
    If it has not ready for use, initialize the Canon:
	make sure the z8000 power supply is on,
	.R CStart 
    and send your file(s) to the Canon with .R CPrint

NOTES:
    You MUST watch your output being printed to catch any errors that
	could make the Canon spew paper.  Glitches in the line can cause 
	unpredictable errors.  
    There is no spooling process; only one person may print a file at a time.  
	Do NOT print a file till the last one is completely out or the last 
	one may be ruined.
    IF THE CANON SPEWS PAPER, PULL OUT THE PAPER TRAY and reinitialize.
    There are no headers or title pages yet, so any listings lying around
	are fair game for use as samples. 

But don't stop here, the details are vital.  Read on!


---- The Canon and TEX files,  PTex and Cantor and fonts ----

		PREPARING YOUR TEX FILE

TEX:
Compile your program in MYFILE.TEX with:  
  .R PTex  			(report any problems to IAZ)
  *\input myfile
This will create a file MYFILE.DVI on your directory.  For a version
of Basic with better sizes for the Canon, see CANBAS.tex[can,sys].

CANTOR:
Make a .CAN file from your .DVI file with Cantor:
  .R Cantor			(report any problems to RAS)
and to the prompt, type MYFILE (it only accepts .DVI files).

    Cantor reworks the DVI file so that it is well-ordered and
includes pictures of the characters needed on each page.  More
information about Cantor and switches is on the next page.

TEX FONTS:
    PTex gets its font information from TFX files in some directory;
the default is [XGP,SYS].  Most fonts currently have TFX and FNT
files on [XGP,SYS].  Some have TFX and/or VNT files on [CAN,SYS].  

    Cantor only uses VNT files and looks for them on [CAN,SYS] unless
you specify a directory in your TEX file (Include no extension!).
Most Computer Modern fonts are already there, most others are not.
A proper font definition is thus "\font z=cmsy10[can,sys]".  If you
do not include the [can,sys], PTex will look in [XGP,SYS] for the
TFX file and Cantor will look in [CAN,SYS], and there is no quarantee
that the two fonts' TFX files match.  (They will match only if the
VNT file was created with MetaFont, not created with FNTCHR and CHRVNT.
In the latter case, the VNT file will have the same number of pixels
per point as the FNT file (for the XGP) which is too few).

    If a font file is not found, Cantor will wait in a loop until a file of 
that name exists or you type <call>.  (Soon this will change to check that
fonts exist when the program begins, and will allow for use of VNT or FNT 
font files, preferably the former, but allowing the latter.  But FNT fonts 
will come out small and thick on the Canon, see below).

MAKING VNT FONTS:
    You can make a VNT file from an FNT font by running FNTCHR and then CHRVNT.
This works, but produces fonts that are smaller and too thick.  Canon prints 
look much better with finer fonts.  For fonts created with metafont, try 
generating the font again (telling metafont to produce a CHR file) and set the
variable "blacker" to 0.2, and the pixels-per-point parameter "pixels" should
be set to 3.36 (the Canon outputs 240 dots/inch whereas the XGP outputs 200
dots/inch and the FindaFont manual says that this is 2.8 dots/point) (see p3
of FindaFont and p87 of the MetaFont manuals if this does not work). Handy DO
files are MAKVNT.do and MAKVN2.do in [can,sys]. The exact metafont commands are:
=====> .R MF↔ mode=1; chrmode; blacker=.2; input <file>↔
(where <fiie> is the metafont file name) give these and you'll be blessed with 
about 5 lines and 5 minutes of output.

---- Cantor: switches                                    ----

CANTOR SWITCHES:
Cantor currently excepts 6 switches.  After the file name, type "/"
    and any of the following:

C #   COPIES (default 1, range 1-20); the number of copies of each
	page you want produced.

S s/l Size of paper- standard is 8.5x11 (the default), legal is 8x14.

P # # PAGE RANGE (default 1-250) If you only want to compile some of the 
	pages of your dvi file, type a first page number (first page is 1) 
	and a last page number.  For just one page, enter its number.
	The numbers are ordinal numbers and have nothing to do with actual
	page numbers.  Note: Cantor will print at most 250 pages.

H n/y HEADER: Default is No.  If something goes wrong while printing and
	you have specified headers, try without them. 

D #   DATA (default 22,000, range 1,000-24,500); the maximum
	number of bytes available for a page in the z8000 memory.
	This is approximate, so leave at least 500 bytes margin.
	The larger MAXD is, the less often Cantor will have to pack,
	the smaller it is, the safer you are.  If you get a problem
	that crashes the Canon, try recompiling with smaller MAXD.

L #   LMARG (default 102=1.3cm, range 0-2000); is the default left
	margin.  The default centers TEX's CanBas(ic) format.  TEX often
	assumes there will be a margin and tries to write left of it
	by giving negative x-coordinates.  Cantor will get violent if
	TEX tries to write left of 0.  If this happens, look at the
	number Cantor tells you and recompile, increasing the margin
	by at least that negative quantity.  And do not increase it so 
	much that the page goes too far to the right!

M #  Magnification; used with version 1 (the new version) of DVI files
	only.  Only distance magnification (not font magnification) is
	done.

B#    deBugging flags, default-none. "+" gives 1,2,4;  "-" gives 1-6;
	1-diagnostics  2-flow of control  3-verbose flow  4-debugging data
	5-verbose data 6-  7-deletepack info  8-addnewchar info
	9-draw chars on last page
	All output goes to terminal and .ERC file.
 
Cantor will echo its values as it begins processing your file, eg:
    MAXD=22000 lmarg=132 standard-size pp:1→250 copies:1
and will tell you the substance of the header if you have asked for
it.  Currently the header is large and obnoxious and poorly typeset.


---- Cantor: output and errors                           ----

READING CANTOR OUTPUT:
Cantor produces two lines of output for every page, eg:
    [3-p2⊂⊃⊂⊃.(s)(c)(3040){90/90/67} p=0 e=1419 u=1280 n=1760 jd=0 i=268
	 totpag=2028 totmem=4727 (n) (o)]

    The first number is the current pagenumber, the second is the page number
according to TEX.  A "⊂" is printed whenever a font file is opened to be
read; when it has been read in, the "⊃" is printed.  "(s)" means a page
has been read in and sorted, "(c)" means the number of bytes of output data
have been counted, "(p)" means a pack was done.  The "(n)" is printed 
when the new character definitions have been  output and the "(o)" means
outputting the page has been finished. 

    The 6 quantities on the right are number of bytes of data rquired for
different kinds of information.  P is packing info, E is extra, unneeded
(on this page) character data already in the z8000, U is used (on this
page) data in the z8000, n is new data to be sent there, jd is junk and
should always be zero and I is the amount of instruction data to print the
page.  The number in parentheses after the "(s)(c)" is the amount of font
data needed by the page and should be equal to the U+N data.

    The totpag figure is approximately the total number of data bytes on
the page and should thus be equal to N+I data.  The totmem figure is an
estimate of the total amount of memory space needed inside the Z8000 for 
the page of data and should be about equal to P+E+U+N+I.
    These figures will not be exact if a PACK occurs, but should be close.

    A glyph is a character if it is short enough, or a slice of a character.
The three numbers in the braces "{#/#/#}" are the number of glyphs on the
page, the number of glyphs that really fit on the page due to the z8000's
limited memory and the number of different glyphs on the page.  Hopefully
the first two numbers will be equal and the third number will be less than
480.  If not, Cantor will try to end the page early.  From what I have seen,
this doesn't quite work, but even if it did, it would look ugly.  Though it
will be fixed sometime, a better solution is to use fewer fonts and/or
smaller fonts.  For instance, trying to print all of the characters in a
CMR22 font is too much for the Canon.  However, no page in the entire TEX
manual requires too much space.
    NOTE: if you only use one font, but tell TEX that you are using ten fonts
and define them all to be the same font file, Cantor will also think you are
using many fonts and it may be too much.

ERRORS:
    Currently, the only errors in Cantor occur if the page has too much
data and this can be detected as stated in the two preceding paragraphs.
If you get something like an array index out-of-bounds error, it is 
probably a similar mistake.  Please send me a copy of the error (rerun
Cantor using the B switch and an error file will be created, or use ppsav).
    There are also survivable errors.  The two most common are: 
"left of page- wrapping" and "page too wide- wrapping".  The x value,
which should be between 0 and 2012 is also given.  This means that TEX
tried to put characters left or right of the margins, resp.  This can
happen if Cantor's margin value is set badly (ie, it disagrees with the
margins TEX thinks it is using).  The latter error can also occur if
overfull boxes are too wide.  Check the TEX errors.  Boxes that are nearly
200 points too wide using the Basic settings will cause these problems.

---- CStart: initializing the Z8000:   			 ----

CStart (gripes to RAS)

    CStart helps you initialize the Canon; run it with: .R CStart
It first instructs the SAIL monitor to find the Z8000 and treat it 
as a 9600 baud terminal.  Then it asks you to reset the Z8000 while
it waits.  In the following, we refer to the Z8000 as "Ziggy".

    When you are ready, CPrint talks to Ziggy, echoing Ziggy's replies,
with some added explanatory notes, to your terminal.  The interaction
is approximately ("<cr>" below stands for a carriage return, CR&LF):

CPrint sends    Meaning         Ziggy replies   Meaning
------------------------------------------------------------
<cr>            wake-up         ?<              huh?
t               get ready to
		accept a file   t<cr>⊃		ok
-- CStart now gives a "Starting to send file" message,
   and starts sending 256 byte blocks containing the file
				⊃		start of block received
				∪		end of block receied
eof		file finished	<		end of file received
R RPC		start program   R RPC
8800				RPC 0000 <8800	
4000				RFC 0000 <4000
G				G		GO! Ziggy is ready.

Here is a sample session using CStart.  User input is framed in "***"'s.

*** .R CStart ***
? Reload the z8000's program (y or n)? *** y ***
starting downloading
the buffer contains:<i> ←that's all...

Please push the Z8000's red reset button, then type <return> ***
<
?<
?t
⊃starting to send Z8000 code...
∪∪∪∪⊃∪⊃∪∪⊃∪⊃∪⊃∪∪⊃∪⊃∪⊃∪∪∪∪⊃∪⊃∪⊃∪⊃∪⊃∪⊃∪⊃∪⊃∪∪∪∪∪∪∪∪∪⊃∪⊃∪⊃∪∪∪∪∪∪∪∪∪∪∪∪∪∪
⊃∪⊃∪∪∪∪∪∪∪∪∪⊃∪⊃∪⊃∪⊃∪∪∪∪∪
finished Z8000 code file.
sending starting instructions

?<R RPC
R8800
R4000
<g


Did it work (if not, we'll try again...(y or n)? *** y ***

That's all, folks!       CPrint out.

End of SAIL execution


Now that the Z8000 is ready, make sure the Canon is too...

---- the Canon printer 					 ----

INITIALIZING THE CANON:
	Turn on the Canon using the large black plastic toggle
on the side (the side that is to the right of the paper tray).
The ready/wait light will blink for a few seconds.  If any other
lights are on, try turning the Canon off and on quickly.  If the 
lights persist, take care of the error conditions as outlined below.

ERROR CONDITIONS:
Documentation is in Canon's (red, spiral bound) notebook.  Briefly:
When lit, the four buttons with sketches above them mean, from left
to right:

  1) Either the paper cassette is installed incorrectly or the Canon
needs more paper.  If the latter, remove the black paper tray from the 
left side of the Canon (just pull gently but firmly).  Find the paper, 
NOTE (!) carefully which side is up and add some paper face up to the 
tray.  Reinsert the tray (put it in approximately the right place, 
push gently and the tray will be guided in).

  2) Maybe the Canon needs more premix.  Try opening and closing the
left front panel.  If the light persists, try again.  If it persists,
it really needs it.  Find a bottle (a Canon bottle with a picture of
a drop like the picture above the light, probably below the table) and 
shake it well. Open the front left panel and pour one third bottle
into the black tray that leads to the tank.

  3) Some paper may be caught in the Canon innards.  Try opening
and closing the front left panel.  If this does not work, there 
may really be some paper caught.  Remove it carefully.  For help
see pages 18-21 of the "Canon LBP-10 Operation Manual". 

  4) if the little toner bottle in the Canon is empty, take it out
(turn CCW `135 and pull it out), and replace it with a full one
(probably below the table) making sure the toner is shaken and the 
black valve is on the bottle properly and put it back into the Canon.  
If it is not empty, the toner is clogging the valve, try turning the 
bottle CW & CCW  few times.



Now that your input is ready, the interface is set-up and the Canon
is ready, you are ready to send your output to the Canon with CPrint.

---- CPrint: printing your output      			 ----

[your text or CAN file should be ready, and the Z8000 and the Canon
 are ready as outlined above]

.R CPrint and you will be prompted for a filename.  If you have TEX
output from your MYFILE.TEX file, to the prompt type MYFILE.CAN eg:

file? myfile.can
    Usually you will see:   meaning:
    H Handshake done        Handshake acknowledged, Z8000's listening
    SSSSSSSSSSSSSW          Data sent, (W marks the end of a page)
    SSSSSSSSSSSSSSSSSSSSW   And another page sent
    S

    If you have text in a file MYFILE.ANY, to the prompt type MYFILE.ANY
and you will be prompted for a font file.  If you have a special one in
mind, give its name (it MUST be an FNT file available on (XGP,SYS) or 
hit return and FIX20 will be selected.  If you do choose another font 
and your listing contains characters not in the font, TS may very well 
blow up (spewing forth many lines of hex code) in which case you will 
have to reset the interface (with CStart) and run CPrint with a better 
choice of font.

If all goes well, you will be reprompted.  Typically the whole process 
takes 10-30 seconds/page.  To leave TS, type "/q" as a file name.

MULTIPLE COPIES of a listing can be produced by typing "#n" where n is
an integer > 0.  After this file has printed, this is reset to 1.

WARNING: do not spool a file till the last one is out!

ERRORS:
If a minute or so passes and nothing happens, first check the lights
on the Canon.  If any are lit, see the section on the Canon.  You 
probably don't need to reset anything, just fix the printer and wait.

On occasion you will get:
H H H H H H H H H H H H H H H H H H H H H H H H  etc..
which means TS keeps sending a handshake but receives no acknowledge; 
the Canon spooler was improperly initialized or fouled by an error, 
re-initialize the Canon (with CStart).

Also, you might get junk that looks like Hex code.  Ignore it.  It may 
signify trouble, but most probably means there is some noise in the line.     

Also, someone may go to sleep while printing a long file.  If you get a
few lines of SSSSSS etc and then suddenly nothing, bummer.  First type 
<CALL> followed by CONT (continue), maybe several times.  If that dosn't 
work, try turning the Canon off and on quickly, but most probably you'll 
have to DO CStart again or wait for the new spooler coming to a theater
near you in the next few months.

If you have more problems, please remember the system is young
and send me your story.  		thanks,  RAS